home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / LCLINT-D.SPK / lclint / guide / fig3-out < prev    next >
Encoding:
Text File  |  1996-08-26  |  1.9 KB  |  40 lines

  1. LCLint 2.2 --- 25 Aug 96
  2.  
  3. bool.c: (in function f)
  4. <A HREF="bool.c.html#line7" target="source">bool.c:7,12</A>: Return value type bool does not match
  5.                 declared type int: b1
  6.   To make bool and int types equivalent, use +boolint.
  7. <A HREF="bool.c.html#line6" target="source">bool.c:6,7</A>: Test expression for if is assignment
  8.                expression: i = 3
  9.   The condition test is an assignment expression.
  10.   Probably, you mean to use == instead of =. If an
  11.   assignment is intended, add an extra parentheses
  12.   nesting (e.g., if ((a = b)) ...) to suppress this
  13.   message. (-predassign will suppress message)
  14. <A HREF="bool.c.html#line6" target="source">bool.c:6,7</A>: Test expression for if not bool, type int:
  15.                i = 3
  16.   Test expression type is not boolean or int.
  17.   (-predboolint will suppress message)
  18. <A HREF="bool.c.html#line8" target="source">bool.c:8,8</A>: Operand of ! is non-boolean (int): !i
  19.   The operand of a boolean operator is not a boolean.
  20.   Use +ptrnegate to allow ! to be used on pointers.
  21.   (-boolops will suppress message)
  22. <A HREF="bool.c.html#line8" target="source">bool.c:8,13</A>: Right operand of || is non-boolean (char
  23.                 *): !i || s
  24. <A HREF="bool.c.html#line10" target="source">bool.c:10,7</A>: Test expression for if not bool, type
  25.                 char *: s
  26.   Test expression type is not boolean. (-predboolptr
  27.   will suppress message)
  28. <A HREF="bool.c.html#line12" target="source">bool.c:12,7</A>: Use of == with bool variables (risks
  29.     inconsistency because of multiple true values):
  30.     b1 == b2
  31.   Two bool values are compared directly using a C
  32.   primitive. This may produce unexpected results since
  33.   all non-zero values are considered TRUE, so
  34.   different TRUE values may not be equal. The file
  35.   bool.h (included in lclint/lib) provides bool_equal
  36.   for safe bool comparisons. (-boolcompare will
  37.   suppress message)
  38.  
  39. Finished LCLint checking --- 7 code errors found
  40.